package com.youlu.campus.entity.vote;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author : [dengbo]
 * @className : OrganizationInfo
 * @description : [组织信息表]
 * @createTime : [2022/6/30 16:01]
 */
@Data
@Document(collection = "vote_organization_info")
@CompoundIndexes({
        @CompoundIndex(name = "idx_tid_org_code", def = "{'orgTypeId':-1,'orgCode':1}", unique = true),
        //@CompoundIndex(name = "idx_tid_vote_num", def = "{'orgTypeId':-1,'totalVoteNum':-1}"),
})
public class VoteOrganizationInfo extends EntityBase {
    /**
     * 组织类型Id
     */
    private String orgTypeId;
    /**
     * 组织Id
     */
    @Indexed
    private String orgId;
    /**
     * 组织名称
     */
    @Indexed
    private String orgName;
    /**
     * 组织编码
     */
    private String orgCode;
    /**
     * 组织logn
     */
    private String orgLogo;
    /**
     * 组织描述
     */
    private String description;
    /**
     * 组织省份
     */
    private String province;
    /**
     * 省份编码
     */
    private String provinceCode;
    /**
     * 总的票数
     */
    private Long totalVoteNum;
    /**
     * 实际投票数量
     */
    private Long realVoteNum;
    /**
     * 是否展示
     */
    private Boolean valid;
}
